/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package fr.adama.entite.modele;

import fr.adama.entite.typePerso.BaseLignePaie;
import fr.adama.entite.typePerso.TypeBaseLigne;
import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;

/**
 *
 * @author mini-john
 */
@Entity
public class LigneBulletinPaieModele implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "lignebulletin_sequence")
    @SequenceGenerator(name = "lignebulletin_sequence", sequenceName = "lignebulletin_sequence")
    private Long id;
    BigDecimal tauxSalarial;
    BigDecimal tauxPatronal;
    @Enumerated(EnumType.STRING)
    BaseLignePaie baselignePaieSalariale;
    @Enumerated(EnumType.STRING)
    BaseLignePaie baselignePaiePatronal;
    @Enumerated(EnumType.STRING)
    TypeBaseLigne typeBaseLigneSalarial;
    @Enumerated(EnumType.STRING)
    TypeBaseLigne typeBaseLignePatronal;
    boolean chargeSalarialImposable;
    Integer positionBulletin;
    private String nom;
    boolean boldCaracter;

    @ManyToOne(fetch = FetchType.LAZY, cascade = {CascadeType.PERSIST, CascadeType.MERGE})
    private ModelePaie modelPaie;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public BigDecimal getTauxSalarial() {
        return tauxSalarial;
    }

    public void setTauxSalarial(BigDecimal tauxSalarial) {
        this.tauxSalarial = tauxSalarial;
    }

    public BigDecimal getTauxPatronal() {
        return tauxPatronal;
    }

    public void setTauxPatronal(BigDecimal tauxPatronal) {
        this.tauxPatronal = tauxPatronal;
    }

    public BaseLignePaie getBaselignePaieSalariale() {
        return baselignePaieSalariale;
    }

    public void setBaselignePaieSalariale(BaseLignePaie baselignePaieSalariale) {
        this.baselignePaieSalariale = baselignePaieSalariale;
    }

    public BaseLignePaie getBaselignePaiePatronal() {
        return baselignePaiePatronal;
    }

    public void setBaselignePaiePatronal(BaseLignePaie baselignePaiePatronal) {
        this.baselignePaiePatronal = baselignePaiePatronal;
    }

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }

    public ModelePaie getModelPaie() {
        return modelPaie;
    }

    public void setModelPaie(ModelePaie modelPaie) {
        this.modelPaie = modelPaie;
    }

    public boolean getBoldCaracter() {
        return boldCaracter;
    }

    public void setBoldCaracter(boolean boldCaracter) {
        this.boldCaracter = boldCaracter;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof LigneBulletinPaieModele)) {
            return false;
        }
        LigneBulletinPaieModele other = (LigneBulletinPaieModele) object;
        return (this.id != null || other.id == null) && (this.id == null || this.id.equals(other.id));
    }

    @Override
    public String toString() {
        return "fr.adama.entite.modele.LigneBulletinPaieModele[ id=" + id + " ]";
    }

    public boolean getChargeSalarialImposable() {
        return chargeSalarialImposable;
    }

    public void setChargeSalarialImposable(boolean chargeSalarialImposable) {
        this.chargeSalarialImposable = chargeSalarialImposable;
    }

    public Integer getPositionBulletin() {
        return positionBulletin;
    }

    public void setPositionBulletin(Integer positionBulletin) {
        this.positionBulletin = positionBulletin;
    }

    public TypeBaseLigne getTypeBaseLigneSalarial() {
        return typeBaseLigneSalarial;
    }

    public void setTypeBaseLigneSalarial(TypeBaseLigne typeBaseLigneSalarial) {
        this.typeBaseLigneSalarial = typeBaseLigneSalarial;
    }

    public TypeBaseLigne getTypeBaseLignePatronal() {
        return typeBaseLignePatronal;
    }

    public void setTypeBaseLignePatronal(TypeBaseLigne typeBaseLignePatronal) {
        this.typeBaseLignePatronal = typeBaseLignePatronal;
    }

}
